import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

class CaseClearItemView extends StatefulWidget {
  @override
  State<StatefulWidget> createState() => _CaseClearItemViewState();
}

class _CaseClearItemViewState extends State<CaseClearItemView> {
  bool _state = false;

  @override
  Widget build(BuildContext context) {
    return Container(
      color: Colors.white,
      padding: EdgeInsets.only(top: 10.w, bottom: 10.w),
      child: Column(
        children: [
          Container(
            child: Row(
              children: [
                SizedBox(
                  width: 12.w,
                ),
                Text(
                  '(2021)湘0702民初01024号',
                  style: TextStyle(color: Color(0xFF666666), fontSize: 13.sp),
                ),
                Spacer(),
                _state
                    ? Text(
                        '已撤诉',
                        style: TextStyle(
                            color: Color(0xFF333333), fontSize: 14.sp),
                      )
                    : Container(
                        padding: EdgeInsets.symmetric(horizontal: 5.w),
                        decoration: BoxDecoration(
                            gradient: LinearGradient(
                              begin: Alignment.topCenter,
                              end: Alignment.bottomCenter,
                              colors: [Color(0xFFFD603E), Color(0xFFFF987F)],
                            ),
                            borderRadius: BorderRadius.circular(10.w)),
                        alignment: Alignment.center,
                        child: Text(
                          '开庭时间录入',
                          style:
                              TextStyle(color: Colors.white, fontSize: 14.sp),
                        ),
                      ),
                SizedBox(
                  width: 12.w,
                ),
              ],
            ),
          ),
          Container(
            margin: EdgeInsets.symmetric(vertical: 8.w, horizontal: 10.w),
            height: 1.w,
            color: Color(0xFFEEEEEE),
          ),
          Container(
            padding: EdgeInsets.symmetric(horizontal: 12.w),
            child: Row(
              children: [
                Text('张三',
                    style:
                        TextStyle(fontSize: 14.sp, color: Color(0xFF333333))),
                Spacer(),
                Text(
                  '￥2553.23',
                  style: TextStyle(
                      fontSize: 18.sp,
                      color: Color(0xFF333333),
                      fontWeight: FontWeight.bold),
                )
              ],
            ),
          ),
          Container(
            padding: EdgeInsets.symmetric(horizontal: 12.w),
            child: Row(
              children: [
                Expanded(
                  child: Text('产品名称产品名称产品名称…',
                      maxLines: 1,
                      overflow: TextOverflow.ellipsis,
                      style:
                          TextStyle(fontSize: 14.sp, color: Color(0xFF333333))),
                ),
                Text('2021-11-01',
                    style: TextStyle(
                      fontSize: 14.sp,
                      color: Color(0xFF6D7278),
                    )),
              ],
            ),
          ),
        ],
      ),
    );
  }
}
